Monthly canonical token stat + fit all three cards side by side#2
Merged
Conversation
- Token card aligned with homepage's canonical 'Monthly Tokens': ?view=month, getTotalTokens formula (prompt + completion), summing only the latest trailing-month bucket (stale partial buckets were overcounting ~200T vs correct ~189T) - Card label now 'Tokens / month' (~189T); GIFs re-rendered - Display width 290 -> 272 so all three cards fit side by side on a standard-width org profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1 with two fixes to the stats cards.
1. Token stat: canonical monthly definition (and a bucket bug)
Per the discussion with Robert/Devin, the token card now matches the homepage's canonical Monthly Tokens metric instead of an ad-hoc weekly figure:
?view=month(was?view=week)getTotalTokens—total_prompt_tokens + (total_completion_tokens ?? 0), excluding reasoning/cached columnsmax(date)before reducing.getMonthlyTokens()and will overcount until it applies the same filter — flagged separately.MarketingMetrics.MonthlyTokenCount)2. Layout: cards now fit side by side
At
width="290"the three cards + inline gaps overflowed the org profile's content column, wrapping the third card. Display width is now 272px — all three fit on a standard desktop profile, still stacking vertically on mobile. (Source GIFs unchanged at 880px; scaling only.)Also: token card alt text updated to "per month", and all six GIFs (dark + light) re-rendered with the new label/value.
Preview